import request from "@/utils/request";
/**
 * GET /admin/acl/permission
获取菜单
 */
export const reqGetPermissionList = () => {
  return request.get("/admin/acl/permission");
};
/**
 * POST /admin/acl/permission/doAssignAcl
给角色分配权限
 */
export const reqDoAssignAcl = (permissionVo) => {
  return request.post("/admin/acl/permission/doAssignAcl", permissionVo);
};
/**
 * GET /admin/acl/permission/toAssign/{roleId}
根据角色获取菜单
 */
export const reqGetToAssignById = (roleId) => {
  return request.get(`/admin/acl/permission/toAssign/${roleId}`);
};
/**
 * POST /admin/acl/permission/save
新增菜单
 */
export const reqAddPermission = (permission) => {
  return request.post("/admin/acl/permission/save", permission);
};
/**
 * PUT /admin/acl/permission/update
修改菜单
 */
export const reqUpdataPermission = (permission) => {
  return request.put("/admin/acl/permission/update", permission);
};
/**
 * DELETE /admin/acl/permission/remove/{id}
递归删除菜单
 */
export const reqDeletePermission = (id)=>{
    return request.delete(`/admin/acl/permission/remove/${id}`)
}